<script setup>import { watch, watchEffect } from 'vue';

const props = defineProps({
    isLoading:Boolean,
    isError:Boolean,
})
</script>

<template>
    <div class="loading-container">
        <slot v-if="!isLoading && !isError">

        </slot>
        <van-loading class="loading" v-if="isLoading" size="40" text-size="25" >加载中...</van-loading>
        <van-loading  class="loading" v-if="isError" size="40" text-size="25" >加载失败</van-loading>
    </div>
</template>

<style scoped>
.loading-container{
    background-color: var(--main-background-color);
    box-sizing: border-box;
}
.loading{
    padding-top: 100px;
    text-align: center;
}
</style>